package com.by.config;

import com.by.entity.Db;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author LittleDesire
 * @description
 * @date 2022-03-22 周二 14:41
 * @since 17
 */
@Configuration
@ComponentScan("com.by.entity")
@EnableAspectJAutoProxy
public class SpringConfig {
    public static void main(String[] args) {

        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
        ctx.register(SpringConfig.class);
        ctx.refresh();

        Db db = ctx.getBean(Db.class);
        db.add();
        db.save();
        db.del();
    }
}
